<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<meta charset="utf-8">
<title>Layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="<%=basePath%>css/CR.css" />
<link rel="stylesheet" href="<%=basePath%>plugins/layui/css/layui.css" />


</head>

<body>
	<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>

	<c:if test="${list == null}">
		<c:redirect url="/computerinfo/tc"></c:redirect>
	</c:if>


	<div class="wrapper">
		<div class="cols">

			<c:forEach items="${list}" var="desc">


				<div class="col" ontouchstart="this.classList.toggle('hover');">

	
					<div class="container">

						<c:if test="${desc.describe == '正常'}">
							<div class="front"
								style="background-image: url(<%=basePath%>images/green.png)">
								<div class="inner">${desc.computerId}</div>
							</div>
						</c:if>


						<c:if test="${desc.describe == '损坏'}">
							<div class="front"
								style="background-image: url(<%=basePath%>images/red.png)">
								<div class="inner">${desc.computerId}</div>
							</div>
						</c:if>

						
						<c:if test="${desc.describe == '待审核'}">
							<div class="front" style="background-image: url(<%=basePath %>images/blue.png)">
								<div class="inner">${desc.computerId}</div>
							</div>
						</c:if>
						
			
						<div class="back"
							onclick="innershow(${desc.computerId},'${desc.computerroomId}')">

							<div class="inner"></div>
						
						</div>

					</div>


				</div>


			</c:forEach>



		</div>

	</div>




	<script type="text/javascript" src="<%=basePath%>js/jquery-1.8.3.js"
		charset="utf-8"></script>
	<script type="text/javascript"
		src="<%=basePath%>plugins/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript">
			
			layui.use(['layer', 'form'], function(){
				  var layer = layui.layer
				  ,form = layui.form;
				  
			});
			
			
			
			function innershow(obj,num){
				
				//配置一个透明的询问框
			/* 	layer.msg('选择操作方式', {
				  time: 20000, //20s后自动关闭
				  btn: ['提交', '查看', '取消']
				}); */
				
				layer.open({
					  type: 2,
					  area: ['100%', '100%'],
					  fixed: true, //不固定
					  shadeClose: true, //点击遮罩关闭层
					  maxmin: false,
					  content: '/1and5Demo/repairList/findR2?computerId='+obj+"&computerroomId="+num
					});
			
			}
		
			
			
			
			
			
				    
			 
		     
		</script>


</body>

</html>
